export tag=v1.0
export bin_name=httpserver-metrics
export rep_addr=zhaoxiaobiao.cn:5000

build:
	echo "building ${bin_name} binary"
	mkdir -p bin/amd64
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/amd64/${bin_name} .

release: build
	echo "building ${bin_name} container"
	docker build -t ${rep_addr}/${bin_name}:${tag} .

push: release
	echo "pushing ${rep_addr}/${bin_name}"
	docker push ${rep_addr}/${bin_name}:v1.0
